﻿using System;
using System.Linq.Expressions;

namespace Alex.Library.Specifications
{
    /// <summary>
    /// the specification always return false, it is contrary to AnySpecification
    /// </summary>
    /// <typeparam name="T">any type</typeparam>
    public sealed class NoneSpecification<T> : Specification<T>
    {
        /// <summary>
        /// get lambda expression's body
        /// </summary>
        /// <returns>lambda expression</returns>
        public override Expression<Func<T, bool>> GetExpression()
        {
            return t => false;
        }
    }
}
